package JSE_02.Map.Demo08;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class Demo08JDK9 {
    public static void main(String[] args){
        int a=123;
        print();
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
        }
        List<String> list=List.of("a","b","c");
        //List.add("cc"); // of()返回的是不可变集合 所以报错
        System.out.println(list);


        Set<String> set= Set.of("w","efesf");
        //set.add("fdsfg"); // 报错 原因同上
        System.out.println(set);

        Map<String,Integer> map= Map.of("张三",19,"李四",19,"王五",19);
        //map.add("赵六",11); // 报错 原因同上
        System.out.println(map);
    }

    public static void print(){
        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");
    }
}
